// Copyright (C) joyinter
// All rights reserved.
// 
// Author : Jiang Li
// Date   : 2004-8-20

#ifndef __BITMAPDATA_H__
#define __BITMAPDATA_H__

#pragma once

#include <common/base/comroot.h>

//##ModelId=44CF17B9031C
class CJoyBitmapData : public CJoyComRoot<CJoyComDefRoot, IDataObject>
{
public:
	//##ModelId=44CF17B9032F
    HBITMAP     m_hBitmap;
	//##ModelId=44CF17B90331
	IStorage*   m_pStorage;	
public:
	//##ModelId=44CF17B9033C
    CJoyBitmapData(void);
	//##ModelId=44CF17B9033E
    virtual ~CJoyBitmapData(void);

	//##ModelId=44CF17B90341
    void SetBitmap(Bitmap* bmp);

	//##ModelId=44CF17B90343
    bool InsertTo(IRichEditOle* pRichEditOle);
	//##ModelId=44CF17B9034B
	bool InsertTo(IRichEditOle* pRichEditOle,int nUser);

	// IDataObject

	//##ModelId=44CF17B9034E
    virtual HRESULT STDMETHODCALLTYPE GetData( 
        FORMATETC *pformatetcIn,        // [unique][in]
        STGMEDIUM *pmedium              // [out]
        );    
	//##ModelId=44CF17B90352
    virtual HRESULT STDMETHODCALLTYPE GetDataHere( 
        FORMATETC *pformatetc,          // [unique][in]
        STGMEDIUM *pmedium              // [out][in]
        );    
	//##ModelId=44CF17B9035C
    virtual HRESULT STDMETHODCALLTYPE QueryGetData( 
        FORMATETC *pformatetc           // [unique][in]
        );    
	//##ModelId=44CF17B9035F
    virtual HRESULT STDMETHODCALLTYPE GetCanonicalFormatEtc( 
        FORMATETC *pformatectIn,        // [unique][in]
        FORMATETC *pformatetcOut        // [out]
        );    
	//##ModelId=44CF17B90363
    virtual HRESULT STDMETHODCALLTYPE SetData( 
        FORMATETC *pformatetc,          // [unique][in]
        STGMEDIUM *pmedium,             // [unique][in]
        BOOL fRelease                   // [in]
        );    
	//##ModelId=44CF17B9036E
    virtual HRESULT STDMETHODCALLTYPE EnumFormatEtc( 
        DWORD dwDirection,              // [in]
        IEnumFORMATETC **ppenumFormatEtc// [out]
        );    
	//##ModelId=44CF17B90372
    virtual HRESULT STDMETHODCALLTYPE DAdvise( 
        FORMATETC *pformatetc,          // [in]
        DWORD advf,                     // [in]
        IAdviseSink *pAdvSink,          // [unique][in]
        DWORD *pdwConnection            // [out]
        );
	//##ModelId=44CF17B9037C
    virtual HRESULT STDMETHODCALLTYPE DUnadvise( 
        DWORD dwConnection              // [in]
        );    
	//##ModelId=44CF17B9037F
    virtual HRESULT STDMETHODCALLTYPE EnumDAdvise(
        IEnumSTATDATA **ppenumAdvise    // [out]
        );
};

#endif  // __BITMAPDATA_H__
